/* ==========================================================================
   固定资产管理系统 - 商务风格Admin样式 5.0
   作者：资产管理团队
   版本：v5.0.0 - Business Edition
   描述：专业商务风格的管理后台样式
   ========================================================================== */

/* CSS变量定义 - 商务配色方案 */
:root {
    /* 主色调 - 深蓝商务色 */
    --primary-color: #1e3a8a;        /* 深蓝主色 */
    --primary-dark: #1e40af;         /* 深蓝加深 */
    --primary-light: #3b82f6;        /* 浅蓝辅助 */
    
    /* 辅助色 - 商务灰色系 */
    --secondary-color: #64748b;      /* 商务灰蓝 */
    --accent-color: #0f172a;         /* 深灰强调色 */
    
    /* 状态色 - 专业配色 */
    --success-color: #059669;        /* 深绿成功色 */
    --warning-color: #d97706;        /* 橙色警告 */
    --danger-color: #dc2626;         /* 红色危险 */
    --info-color: #0284c7;           /* 蓝色信息 */
    
    /* 中性色 - 商务灰色调色板 */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e0;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* 阴影 - 专业阴影效果 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* 渐变 - 商务渐变 */
    --gradient-primary: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    --gradient-secondary: linear-gradient(135deg, #64748b 0%, #94a3b8 100%);
    --gradient-success: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --gradient-warning: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    --gradient-danger: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    
    /* 圆角 */
    --radius-sm: 0.125rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    
    /* 字体 */
    --font-primary: 'Inter', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* ==========================================================================
   布局结构优化 - 修复布局混乱问题
   ========================================================================== */

/* 整体容器布局 */
body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--gray-700);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* 主容器结构 */
#container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* 侧边栏固定布局 */
#nav-sidebar {
    position: fixed !important;
    left: 0;
    top: 0;
    width: 240px !important;
    height: 100vh;
    background: white !important;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* 主内容区域布局 */
.main {
    margin-left: 240px !important;
    width: calc(100% - 240px) !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航栏 */
#header {
    background: var(--gradient-primary) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: none;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 999;
    width: 100%;
}

/* 内容区域 */
.content {
    flex: 1;
    padding: 20px 25px !important;
    margin: 0 !important;
    background: var(--gray-50);
    min-height: calc(100vh - 80px);
}

/* 内容主体 */
#content-main {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* ==========================================================================
   网格布局系统 - 优化版
   ========================================================================== */

/* 统计卡片网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
}

/* 管理功能网格 */
.management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
}

/* 快速链接网格 */
.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    width: 100%;
}

/* 欢迎消息卡片 */
.welcome-message {
    background: var(--gradient-primary);
    color: white;
    padding: 25px;
    border-radius: var(--radius-lg);
    margin: 0 0 30px 0;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.welcome-message h2 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.welcome-message p {
    margin: 0;
    opacity: 0.95;
    font-size: 1rem;
}

/* 统计卡片样式 */
.stats-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.stats-card h3 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
}

.stats-card h3 i {
    margin-right: 10px;
    font-size: 1.3em;
    color: var(--primary-color);
}

.stats-card p {
    margin: 8px 0;
    font-size: 0.95rem;
    color: var(--gray-600);
}

.stats-card strong {
    color: var(--gray-800);
    font-weight: 600;
}

/* 管理功能模块样式 */
.management-module {
    background: white;
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    position: relative;
}

.management-module:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.management-module h3 {
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-100);
}

.management-module h3 i {
    margin-right: 12px;
    font-size: 1.2em;
}

/* 模型列表样式 */
.model-list {
    display: grid;
    gap: 8px;
}

.model-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
    transition: all 0.2s ease;
}

.model-item:last-child {
    border-bottom: none;
}

.model-item:hover {
    background: rgba(30, 58, 138, 0.05);
    border-radius: var(--radius-sm);
    padding-left: 10px;
    padding-right: 10px;
}

.model-name {
    flex: 1;
    font-weight: 500;
    color: var(--gray-700);
}

.model-name a {
    color: var(--gray-700);
    text-decoration: none;
    transition: color 0.2s ease;
}

.model-name a:hover {
    color: var(--primary-color);
}

.model-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid;
}

.action-btn.add {
    color: var(--success-color);
    border-color: var(--success-color);
    background: rgba(5, 150, 105, 0.1);
}

.action-btn.add:hover {
    background: var(--success-color);
    color: white;
    transform: translateY(-1px);
}

.action-btn.change {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(30, 58, 138, 0.1);
}

.action-btn.change:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

/* 快速链接样式 */
.quick-link {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.quick-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--gray-50);
    border-color: var(--primary-color);
}

.quick-link i {
    font-size: 1.2em;
    margin-right: 12px;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.quick-link-content {
    flex: 1;
}

.quick-link-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.quick-link-desc {
    font-size: 0.8rem;
    color: var(--gray-500);
    line-height: 1.3;
}

/* 顶部导航栏 - 商务风格 */
#header {
    background: var(--gradient-primary) !important;
    box-shadow: var(--shadow-lg);
    border: none;
    padding: 1rem 2rem;
}

#header .header-title {
    color: white !important;
    font-weight: 700;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* 侧边栏美化 - 商务风格 */
#nav-sidebar {
    background: white !important;
    box-shadow: var(--shadow-xl);
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
    overflow: hidden;
    border-right: 1px solid var(--gray-200);
    width: 200px !important; /* 减少侧边栏宽度 */
    min-width: 200px !important;
}

/* 主内容区域优化 */
#content {
    margin-left: 210px !important; /* 对应侧边栏宽度 + 间距 */
    padding: 20px !important;
    max-width: none !important;
}

/* ==========================================================================
   响应式设计 - 优化版
   ========================================================================== */

/* 大屏幕优化 (1400px+) */
@media (min-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .management-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 中等屏幕 (1024px - 1399px) */
@media (max-width: 1399px) and (min-width: 1024px) {
    #nav-sidebar {
        width: 220px !important;
    }
    
    .main {
        margin-left: 220px !important;
        width: calc(100% - 220px) !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
    
    .management-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

/* 平板设备 (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    #nav-sidebar {
        width: 200px !important;
    }
    
    .main {
        margin-left: 200px !important;
        width: calc(100% - 200px) !important;
    }
    
    .content {
        padding: 15px 20px !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .management-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .quick-links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stats-card,
    .management-module {
        padding: 20px;
    }
}

/* 手机设备 (< 768px) */
@media (max-width: 767px) {
    #nav-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    #nav-sidebar.show {
        transform: translateX(0);
    }
    
    .main {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .content {
        padding: 10px 15px !important;
    }
    
    .stats-grid,
    .management-grid,
    .quick-links-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stats-card,
    .management-module {
        padding: 15px;
    }
    
    .welcome-message {
        padding: 20px;
        margin: 0 0 20px 0;
    }
    
    .welcome-message h2 {
        font-size: 1.3rem;
    }
    
    /* 手机端菜单切换按钮 */
    .mobile-menu-toggle {
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1001;
        background: var(--primary-color);
        color: white;
        border: none;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        cursor: pointer;
        box-shadow: var(--shadow-lg);
        transition: all 0.3s ease;
    }
    
    .mobile-menu-toggle:hover {
        background: var(--primary-dark);
        transform: scale(1.05);
    }
}

/* 超小屏幕 (< 480px) */
@media (max-width: 479px) {
    .content {
        padding: 8px 10px !important;
    }
    
    .stats-card,
    .management-module {
        padding: 12px;
    }
    
    .welcome-message {
        padding: 15px;
    }
    
    .welcome-message h2 {
        font-size: 1.2rem;
    }
    
    .quick-link {
        padding: 12px;
        flex-direction: column;
        text-align: center;
    }
    
    .quick-link i {
        margin-right: 0;
        margin-bottom: 8px;
    }
}

/* ========================================================================== 
   侧边栏导航优化 - 现代化Django管理后台
   ========================================================================== */

/* 侧边栏容器 */
#nav-sidebar .nav-sidebar {
    padding: 0;
    background: transparent;
    height: 100%;
}

/* 应用模块标题样式 - 现代化设计 */
#nav-sidebar .nav-sidebar h2 {
    background: var(--gradient-primary) !important;
    color: white !important;
    padding: 18px 20px !important;
    margin: 0 0 2px 0 !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    text-transform: none;
    letter-spacing: 0.3px;
    border: none;
    text-align: left;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

#nav-sidebar .nav-sidebar h2:hover {
    background: var(--primary-dark) !important;
    transform: translateX(2px);
}

/* 为主标题添加图标 */
#nav-sidebar .nav-sidebar h2:first-child::before {
    content: '🏢';
    margin-right: 8px;
    font-size: 1.2em;
}

/* 为ASSETS应用标题添加图标 */
#nav-sidebar .nav-sidebar > div:first-child h2::before {
    content: '📦';
    margin-right: 8px;
    font-size: 1em;
}

/* 为用户管理应用标题添加图标 */
#nav-sidebar .nav-sidebar > div:nth-child(2) h2::before {
    content: '👥';
    margin-right: 8px;
    font-size: 1em;
}

/* 为令牌应用标题添加图标 */
#nav-sidebar .nav-sidebar > div:nth-child(3) h2::before {
    content: '🔑';
    margin-right: 8px;
    font-size: 1em;
}

/* 侧边栏列表 - 优化间距 */
#nav-sidebar .nav-sidebar ul {
    padding: 0;
    margin: 0;
    list-style: none;
    background: white;
}

/* 侧边栏列表项 */
#nav-sidebar .nav-sidebar ul li {
    margin: 3px 8px;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
}

/* 主链接样式 - 优化布局 */
#nav-sidebar .nav-sidebar ul li a:not(.addlink) {
    display: flex;
    align-items: center;
    padding: 14px 18px !important;
    color: var(--gray-700) !important;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 0;
    transition: all 0.3s ease;
    border: none;
    border-bottom: 1px solid var(--gray-100);
    background: white;
    position: relative;
    min-height: 48px;
    margin: 0 !important;
    width: calc(100% - 55px); /* 为添加按钮留出空间 */
}

/* 为不同类型的菜单项添加图标 */
#nav-sidebar .nav-sidebar ul li a[href*="asset/"]::before {
    content: '💻';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

#nav-sidebar .nav-sidebar ul li a[href*="position/"]::before {
    content: '📍';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

#nav-sidebar .nav-sidebar ul li a[href*="supplier/"]::before {
    content: '🏪';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

#nav-sidebar .nav-sidebar ul li a[href*="contract/"]::before {
    content: '📄';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

#nav-sidebar .nav-sidebar ul li a[href*="workorder/"]::before {
    content: '🛠️';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

#nav-sidebar .nav-sidebar ul li a[href*="maintenance/"]::before {
    content: '🔧';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

#nav-sidebar .nav-sidebar ul li a[href*="user/"]::before {
    content: '👤';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

#nav-sidebar .nav-sidebar ul li a[href*="material/"]::before {
    content: '📋';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

#nav-sidebar .nav-sidebar ul li a[href*="department/"]::before {
    content: '🏢';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

#nav-sidebar .nav-sidebar ul li a[href*="assetcategory/"]::before {
    content: '📂';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

#nav-sidebar .nav-sidebar ul li a[href*="organization/"]::before {
    content: '🏛️';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

#nav-sidebar .nav-sidebar ul li a[href*="location/"]::before {
    content: '🗺️';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

#nav-sidebar .nav-sidebar ul li a[href*="software/"]::before {
    content: '💿';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

#nav-sidebar .nav-sidebar ul li a[href*="token/"]::before {
    content: '🎫';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

#nav-sidebar .nav-sidebar ul li a[href*="group/"]::before {
    content: '👥';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

/* 默认图标（没有匹配到特定类型的项目） */
#nav-sidebar .nav-sidebar ul li a:not([href*="asset/"]):not([href*="position/"]):not([href*="supplier/"]):not([href*="contract/"]):not([href*="workorder/"]):not([href*="maintenance/"]):not([href*="user/"]):not([href*="material/"]):not([href*="department/"]):not([href*="assetcategory/"]):not([href*="organization/"]):not([href*="location/"]):not([href*="software/"]):not([href*="token/"]):not([href*="group/"]):not(.addlink)::before {
    content: '📋';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

/* 为更多菜单项添加图标 */
#nav-sidebar .nav-sidebar ul li a[href*="borrow"]::before {
    content: '🤝';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

#nav-sidebar .nav-sidebar ul li a[href*="return"]::before {
    content: '↩️';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

#nav-sidebar .nav-sidebar ul li a[href*="report"]::before {
    content: '📊';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

#nav-sidebar .nav-sidebar ul li a[href*="audit"]::before {
    content: '🔍';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

#nav-sidebar .nav-sidebar ul li a[href*="approval"]::before {
    content: '✅';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

#nav-sidebar .nav-sidebar ul li a[href*="notification"]::before {
    content: '🔔';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

#nav-sidebar .nav-sidebar ul li a[href*="backup"]::before {
    content: '💾';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

#nav-sidebar .nav-sidebar ul li a[href*="setting"]::before {
    content: '⚙️';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

#nav-sidebar .nav-sidebar ul li a[href*="permission"]::before {
    content: '🔐';
    margin-right: 10px;
    font-size: 1em;
    width: 20px;
    text-align: center;
}

/* 悬停效果增强 - 现代化交互 */
#nav-sidebar .nav-sidebar ul li a:not(.addlink):hover {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light)) !important;
    color: white !important;
    transform: translateX(3px);
    border-left: 4px solid var(--warning-color);
    box-shadow: 2px 0 8px rgba(30, 58, 138, 0.3);
    border-bottom-color: var(--primary-dark);
}

#nav-sidebar .nav-sidebar ul li a:not(.addlink):hover::before {
    transform: scale(1.1);
    filter: brightness(1.2);
}

/* 活动状态样式 */
#nav-sidebar .nav-sidebar ul li a:not(.addlink):active {
    transform: translateX(1px);
    transition: transform 0.1s ease;
}

/* 当前选中项样式 */
#nav-sidebar .nav-sidebar ul li a.selected,
#nav-sidebar .nav-sidebar ul li a.focused {
    background: rgba(30, 58, 138, 0.1) !important;
    color: var(--primary-color) !important;
    border-color: var(--primary-color);
    font-weight: 600;
}

/* 添加按钮优化 - 现代化设计 */
#nav-sidebar .nav-sidebar ul li a.addlink {
    color: var(--success-color) !important;
    font-size: 0.75rem;
    padding: 8px 12px !important;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 45px;
    height: 32px;
    text-align: center;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1), rgba(5, 150, 105, 0.05));
    border: 1.5px solid var(--success-color);
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#nav-sidebar .nav-sidebar ul li a.addlink::before {
    content: '+';
    margin-right: 4px;
    font-weight: bold;
}

#nav-sidebar .nav-sidebar ul li a.addlink:hover {
    background: linear-gradient(135deg, var(--success-color), #10b981) !important;
    color: white !important;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
    border-color: #10b981;
}

/* 列表项布局调整 - 现代化布局 */
#nav-sidebar .nav-sidebar ul li {
    position: relative;
    min-height: 48px;
    margin: 0;
    background: white;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--gray-100);
}

#nav-sidebar .nav-sidebar ul li:hover {
    background: var(--gray-50);
}

#nav-sidebar .nav-sidebar ul li:last-child {
    border-bottom: none;
}

/* 应用模块分组 - 改进分组视觉 */
#nav-sidebar .nav-sidebar > div {
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 0;
    padding-bottom: 0;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#nav-sidebar .nav-sidebar > div:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* 模块组间距 */
#nav-sidebar .nav-sidebar > div + div {
    margin-top: 1px;
}

/* 子标题样式（如果有的话） */
#nav-sidebar .nav-sidebar > div > h2:not(:first-child) {
    background: var(--gray-100) !important;
    color: var(--gray-700) !important;
    padding: 10px 15px !important;
    margin: 5px 8px 0 8px !important;
    font-size: 0.9rem !important;
    text-transform: none;
    border-radius: var(--radius-md);
    text-align: left;
}

/* 侧边栏滚动条优化 - 现代化设计 */
#nav-sidebar::-webkit-scrollbar {
    width: 8px;
    background: transparent;
}

#nav-sidebar::-webkit-scrollbar-track {
    background: var(--gray-50);
    border-radius: 4px;
    margin: 5px 0;
}

#nav-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 4px;
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

#nav-sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: scaleY(1.1);
}

/* Firefox 滚动条样式 */
#nav-sidebar {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--gray-50);
}

/* 模块卡片 - 商务风格 */
.module {
    background: white;
    margin: 1rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.module:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.module caption {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
    margin: 0;
}

.module table {
    width: 100%;
    border-collapse: collapse;
}

.module th,
.module td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.module th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
}

.module td a {
    color: var(--gray-700);
    text-decoration: none;
    transition: color 0.2s ease;
}

.module td a:hover {
    color: var(--primary-color);
}

/* 表格美化 - 商务风格 */
.results {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin: 1rem 0;
    border: 1px solid var(--gray-200);
}

.results table {
    width: 100%;
    border-collapse: collapse;
}

.results thead {
    background: var(--gradient-primary);
}

.results thead th {
    color: white;
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.results tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--gray-200);
}

.results tbody tr:hover {
    background: var(--gray-50);
    transform: scale(1.005);
}

.results tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

/* 按钮美化 - 商务风格 */
.button,
input[type="submit"],
input[type="button"],
.btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid transparent;
}

.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    background: var(--primary-dark);
}

.button.default,
.btn-secondary {
    background: var(--gradient-secondary);
}

.button.addlink,
.btn-success {
    background: var(--gradient-success);
}

.button.deletelink,
.btn-danger {
    background: var(--gradient-danger);
}

/* 表单美化 - 商务风格 */
.form-row {
    margin-bottom: 1rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: white;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
    transform: scale(1.02);
}

/* 消息框美化 - 商务风格 */
.messagelist {
    margin: 1rem 0;
    padding: 0;
    list-style: none;
}

.messagelist li {
    margin-bottom: 0.5rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid;
}

.messagelist .success {
    background: #f0fdfa;
    color: var(--success-color);
    border-left-color: var(--success-color);
}

.messagelist .error {
    background: #fef2f2;
    color: var(--danger-color);
    border-left-color: var(--danger-color);
}

.messagelist .warning {
    background: #fffbeb;
    color: var(--warning-color);
    border-left-color: var(--warning-color);
}

/* 仪表板小部件 - 商务风格 */
.dashboard-widget {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin: 1rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.dashboard-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.dashboard-widget:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.widget-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.widget-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* 卡片组件 - 商务风格 */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.card-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 1.5rem;
    border: none;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* 分页器美化 - 商务风格 */
.paginator {
    text-align: center;
    margin: 2rem 0;
}

.paginator a,
.paginator span {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.paginator a {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.paginator a:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.paginator .this-page {
    background: var(--gradient-primary);
    color: white;
    border: 2px solid transparent;
}

/* 筛选器美化 - 商务风格 */
#changelist-filter {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    margin: 1rem 0;
    border: 1px solid var(--gray-200);
}

#changelist-filter h3 {
    background: var(--gradient-primary);
    color: white;
    margin: -1.5rem -1.5rem 1rem;
    padding: 1rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

#changelist-filter li {
    margin-bottom: 0.5rem;
}

#changelist-filter a {
    color: var(--gray-600);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    display: block;
}

#changelist-filter a:hover,
#changelist-filter a.selected {
    background: var(--primary-color);
    color: white;
}

/* 搜索框美化 - 商务风格 */
#toolbar {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin: 1rem 0;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

#searchbar {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s ease;
}

#searchbar:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* 自定义滚动条 - 商务风格 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* 整体布局优化 */
#container {
    display: flex !important;
    min-height: 100vh;
}

#main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.main {
    flex: 1 !important;
    margin-left: 210px !important;
    padding: 0 !important;
}

/* 导航栏布局 */
#header {
    background: var(--gradient-primary) !important;
    box-shadow: var(--shadow-lg);
    border: none;
    padding: 1rem 2rem;
    position: relative;
    z-index: 1000;
}

/* 内容区域充分利用空间 */
.content {
    flex: 1;
    padding: 15px 20px !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
    overflow-x: auto;
}

/* 欢迎消息优化 */
.welcome-message {
    margin: 15px 0 20px 0 !important;
    padding: 18px !important;
}

/* 响应式布局优化 */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 12px;
    }
    
    .management-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 992px) {
    .main {
        margin-left: 190px !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
    
    .management-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .main {
        margin-left: 170px !important;
    }
    
    .content {
        padding: 10px 15px !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .management-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* 动画效果 */
@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-slide-in {
    animation: slideInUp 0.6s ease-out;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-in;
}

/* ==========================================================================
   高级交互组件 - 搜索、动画、特效
   ========================================================================== */

/* 全局搜索容器 */
.global-search-container {
    background: white;
    border-radius: var(--radius-xl);
    padding: 25px;
    margin: 20px 0 30px 0;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    position: relative;
}

/* 搜索框样式 */
.search-box {
    position: relative;
    margin-bottom: 15px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 1.1rem;
    z-index: 2;
}

.global-search-input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.global-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.05);
    transform: scale(1.02);
}

/* 搜索建议 */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.suggestion-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.suggestion-item:hover {
    background: var(--gray-50);
    border-left: 4px solid var(--primary-color);
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* 搜索过滤器 */
.search-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    background: white;
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

/* 进度条组件 */
.progress-bar {
    margin-top: 12px;
    position: relative;
    background: var(--gray-200);
    border-radius: var(--radius-md);
    height: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color) 0%, var(--info-color) 100%);
    border-radius: var(--radius-md);
    transition: width 2s ease;
    width: 0;
}

.progress-text {
    position: absolute;
    top: -25px;
    right: 0;
    font-size: 0.8rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* 趋势指示器 */
.trend-indicator {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(5, 150, 105, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

/* 活动脉冲 */
.activity-pulse {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--success-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Ping 指示器 */
.ping-indicator {
    background: rgba(5, 150, 105, 0.1);
    color: var(--success-color);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
}

/* 系统健康状态 */
.system-health {
    margin-top: 12px;
    display: grid;
    gap: 8px;
}

.health-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--gray-600);
}

.mini-progress {
    flex: 1;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    margin: 0 8px;
    overflow: hidden;
}

.mini-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1.5s ease;
}

/* 数字计数器动画 */
.counter {
    display: inline-block;
    transition: all 0.3s ease;
}

.counter.counting {
    transform: scale(1.1);
}

/* 轮播图组件 */
.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    margin: 20px 0;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    text-align: center;
}

.carousel-controls {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: white;
    transform: scale(1.2);
}

/* 通知系统 */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 350px;
}

.notification-toast.show {
    transform: translateX(0);
}

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.notification-title {
    font-weight: 600;
    color: var(--gray-800);
}

.notification-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0;
    font-size: 1.2rem;
}

.notification-body {
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* 成功通知 */
.notification-toast.success {
    border-left-color: var(--success-color);
}

.notification-toast.success .notification-title {
    color: var(--success-color);
}

/* 警告通知 */
.notification-toast.warning {
    border-left-color: var(--warning-color);
}

.notification-toast.warning .notification-title {
    color: var(--warning-color);
}

/* 错误通知 */
.notification-toast.error {
    border-left-color: var(--danger-color);
}

.notification-toast.error .notification-title {
    color: var(--danger-color);
}

/* 数据可视化组件 */
.chart-container {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    margin: 20px 0;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-100);
}

.chart-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-800);
}

.chart-period {
    display: flex;
    gap: 8px;
}

.period-btn {
    padding: 6px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--gray-600);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.period-btn:hover,
.period-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-200);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 骨架屏加载 */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 12px;
    margin: 8px 0;
}

.skeleton-title {
    height: 16px;
    width: 60%;
    margin: 12px 0;
}

.skeleton-button {
    height: 36px;
    width: 100px;
    border-radius: var(--radius-md);
}

/* 悬浮动作按钮 */
.floating-action-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-xl);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-action-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.4);
}

/* 数据标签 */
.data-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(5, 150, 105, 0.1);
    color: var(--success-color);
}

.badge-warning {
    background: rgba(217, 119, 6, 0.1);
    color: var(--warning-color);
}

.badge-danger {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger-color);
}

.badge-info {
    background: rgba(2, 132, 199, 0.1);
    color: var(--info-color);
}

/* 数据表格增强 */
.enhanced-table {
    position: relative;
    overflow: hidden;
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.table-search {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-btn {
    padding: 6px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--gray-600);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.table-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 卡片动画增强 */
.card-shimmer {
    position: relative;
    overflow: hidden;
}

.card-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ==========================================================================
   高级数据可视化组件
   ========================================================================== */

/* 性能监控面板 */
.performance-panel {
    background: white;
    border-radius: var(--radius-xl);
    padding: 25px;
    margin: 20px 0;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--info-color);
}

.performance-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-100);
}

.performance-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
}

.performance-title i {
    margin-right: 10px;
    color: var(--info-color);
}

.performance-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(5, 150, 105, 0.1);
    border-radius: var(--radius-md);
    color: var(--success-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.performance-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.metric-item {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 15px;
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.metric-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.metric-label {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 8px;
    font-weight: 500;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.metric-unit {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 500;
}

.metric-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    margin-top: 5px;
}

.trend-up {
    color: var(--success-color);
}

.trend-down {
    color: var(--danger-color);
}

.trend-stable {
    color: var(--gray-500);
}

/* 实时图表容器 */
.realtime-chart {
    background: white;
    border-radius: var(--radius-xl);
    padding: 25px;
    margin: 20px 0;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--warning-color);
}

.chart-canvas {
    width: 100%;
    height: 200px;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.chart-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* 统计环形图 */
.donut-chart {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.donut-chart svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.donut-chart circle {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
}

.donut-bg {
    stroke: var(--gray-200);
}

.donut-progress {
    stroke: var(--primary-color);
    stroke-dasharray: 0 314;
    transition: stroke-dasharray 1.5s ease;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.donut-label {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-top: 2px;
}

/* 活动时间轴 */
.activity-timeline {
    background: white;
    border-radius: var(--radius-xl);
    padding: 25px;
    margin: 20px 0;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--success-color);
}

.timeline-list {
    position: relative;
    padding-left: 20px;
}

.timeline-list::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

.timeline-item {
    position: relative;
    padding: 15px 0;
    margin-left: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 20px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 0 3px white, 0 0 0 5px var(--gray-200);
}

.timeline-item.success::before {
    background: var(--success-color);
    box-shadow: 0 0 0 3px white, 0 0 0 5px rgba(5, 150, 105, 0.3);
}

.timeline-item.warning::before {
    background: var(--warning-color);
    box-shadow: 0 0 0 3px white, 0 0 0 5px rgba(217, 119, 6, 0.3);
}

.timeline-content {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 15px;
    border: 1px solid var(--gray-200);
}

.timeline-title {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 5px;
}

.timeline-desc {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.timeline-time {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* 高级数据表格 */
.advanced-table {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    margin: 20px 0;
}

.table-header-enhanced {
    background: var(--gradient-primary);
    color: white;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.table-title-enhanced {
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.table-title-enhanced i {
    margin-right: 10px;
}

.table-actions-enhanced {
    display: flex;
    gap: 10px;
}

.table-action-btn {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.table-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.table-filters {
    background: var(--gray-50);
    padding: 15px 25px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label {
    font-size: 0.9rem;
    color: var(--gray-700);
    font-weight: 500;
}

.filter-select {
    padding: 6px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.1);
}

/* 拖拽排序表格 */
.sortable-table {
    width: 100%;
    border-collapse: collapse;
}

.sortable-table thead th {
    background: var(--gray-100);
    color: var(--gray-700);
    font-weight: 600;
    padding: 15px;
    text-align: left;
    border-bottom: 2px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.sortable-table thead th:hover {
    background: var(--gray-200);
    color: var(--primary-color);
}

.sortable-table thead th.sorted {
    background: var(--primary-color);
    color: white;
}

.sort-indicator {
    margin-left: 8px;
    font-size: 0.8rem;
    opacity: 0.7;
}

.sortable-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--gray-200);
}

.sortable-table tbody tr:hover {
    background: var(--gray-50);
    transform: scale(1.002);
}

.sortable-table tbody tr.dragging {
    opacity: 0.5;
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.sortable-table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
}

/* 拖拽手柄 */
.drag-handle {
    cursor: grab;
    color: var(--gray-400);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.drag-handle:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

.drag-handle:active {
    cursor: grabbing;
}

/* 高级工具栏 */
.toolbar-enhanced {
    background: white;
    border-radius: var(--radius-lg);
    padding: 15px 20px;
    margin: 20px 0;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.toolbar-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbar-divider {
    width: 1px;
    height: 20px;
    background: var(--gray-300);
    margin: 0 5px;
}

/* 批量操作面板 */
.bulk-actions {
    background: rgba(30, 58, 138, 0.05);
    border: 1px solid rgba(30, 58, 138, 0.2);
    border-radius: var(--radius-lg);
    padding: 15px 20px;
    margin: 15px 0;
    display: none;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.bulk-actions.show {
    display: flex;
}

.bulk-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-weight: 500;
}

.bulk-buttons {
    display: flex;
    gap: 8px;
}

.bulk-btn {
    padding: 6px 12px;
    border: 1px solid;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bulk-btn.danger {
    color: var(--danger-color);
    border-color: var(--danger-color);
    background: rgba(220, 38, 38, 0.1);
}

.bulk-btn.danger:hover {
    background: var(--danger-color);
    color: white;
}

.bulk-btn.success {
    color: var(--success-color);
    border-color: var(--success-color);
    background: rgba(5, 150, 105, 0.1);
}

.bulk-btn.success:hover {
    background: var(--success-color);
    color: white;
}

/* 高级分页器 */
.pagination-enhanced {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-radius: var(--radius-lg);
    padding: 15px 20px;
    margin: 20px 0;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.pagination-info {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--gray-600);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.page-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.page-btn.current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 15px;
}

.page-size-select {
    padding: 6px 10px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: white;
    font-size: 0.9rem;
}

/* 上下文菜单 */
.context-menu {
    position: fixed;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    padding: 8px 0;
    min-width: 180px;
    z-index: 9999;
    display: none;
}

.context-menu.show {
    display: block;
}

.context-menu-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 10px;
}

.context-menu-item:hover {
    background: var(--gray-50);
    color: var(--primary-color);
}

.context-menu-item.danger {
    color: var(--danger-color);
}

.context-menu-item.danger:hover {
    background: rgba(220, 38, 38, 0.1);
}

.context-menu-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 4px 0;
}

/* 全屏模式 */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}

.fullscreen-overlay.show {
    display: flex;
}

.fullscreen-content {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 95vw;
    max-height: 95vh;
    overflow: auto;
    box-shadow: var(--shadow-xl);
}

.fullscreen-header {
    background: var(--gradient-primary);
    color: white;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1;
}

.fullscreen-title {
    font-size: 1.3rem;
    font-weight: 600;
}

.fullscreen-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.fullscreen-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.fullscreen-body {
    padding: 25px;
}

/* ==========================================================================
   增强仪表板样式
   ========================================================================== */

/* 仪表板面板 */
.dashboard-panel {
    position: relative;
    overflow: hidden;
}

.dashboard-panel.primary {
    border-left-color: var(--primary-color);
}

.dashboard-panel.success {
    border-left-color: var(--success-color);
}

.dashboard-panel.warning {
    border-left-color: var(--warning-color);
}

.dashboard-panel.danger {
    border-left-color: var(--danger-color);
}

.dashboard-panel.info {
    border-left-color: var(--info-color);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-200);
}

.panel-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.panel-actions {
    display: flex;
    gap: 5px;
}

.panel-btn {
    background: none;
    border: none;
    padding: 5px;
    border-radius: var(--radius-sm);
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.panel-btn:hover {
    background: var(--gray-100);
    color: var(--primary-color);
}

/* 仪表板网格 */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

/* 指标卡片 */
.metric-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.metric-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.metric-info {
    flex: 1;
    min-width: 0;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 3px;
}

.metric-label {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 5px;
}

.metric-change {
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 3px;
}

.metric-change.positive {
    color: var(--success-color);
}

.metric-change.negative {
    color: var(--danger-color);
}

.metric-change.neutral {
    color: var(--gray-500);
}

/* 利用率图表 */
.utilization-chart {
    margin-top: 20px;
}

.utilization-chart h4 {
    margin: 0 0 15px 0;
    font-size: 1rem;
    color: var(--gray-700);
    font-weight: 600;
}

.mini-line-chart {
    height: 60px;
    position: relative;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 10px;
    border: 1px solid var(--gray-200);
}

.chart-point {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transform: translate(-50%, 50%);
    transition: all 0.3s ease;
    cursor: pointer;
}

.chart-point:hover {
    transform: translate(-50%, 50%) scale(1.5);
    box-shadow: 0 0 10px rgba(30, 58, 138, 0.5);
}

.chart-line {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
}

/* 洞察网格 */
.insights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.insight-card {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 15px;
    border: 1px solid var(--gray-200);
}

.insight-card h4 {
    margin: 0 0 15px 0;
    font-size: 0.95rem;
    color: var(--gray-700);
    font-weight: 600;
}

/* 部门排名 */
.dept-ranking {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.ranking-item:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.dept-name {
    flex: 1;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.dept-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* 价值分布 */
.value-distribution {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.value-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--gray-700);
}

.value-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.value-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1.5s ease;
    width: 0%;
}

/* 维修摘要 */
.maintenance-summary {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 12px;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray-600);
}

.maintenance-types h4 {
    margin: 0 0 15px 0;
    font-size: 1rem;
    color: var(--gray-700);
    font-weight: 600;
}

.type-chart {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.type-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.type-item:hover {
    background: white;
    border-color: var(--primary-color);
}

.type-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.type-name {
    flex: 1;
    font-size: 0.85rem;
    color: var(--gray-700);
}

.type-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(30, 58, 138, 0.1);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

/* 财务概览 */
.financial-overview {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.financial-metrics {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.metric-large {
    text-align: center;
    padding: 15px;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    min-width: 140px;
}

.metric-value-large {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.metric-label-large {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 8px;
    display: block;
}

.metric-trend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 0.8rem;
}

.financial-breakdown {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

.breakdown-label {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.breakdown-value {
    font-size: 0.9rem;
    font-weight: 600;
}

.roi-analysis h4 {
    margin: 0 0 15px 0;
    font-size: 1rem;
    color: var(--gray-700);
    font-weight: 600;
}

.roi-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.roi-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.roi-fill {
    height: 12px;
    border-radius: 6px;
    width: 0%;
    transition: width 1.5s ease;
    flex: 1;
}

.roi-label {
    font-size: 0.8rem;
    color: var(--gray-600);
    width: 60px;
    text-align: right;
}

.roi-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    width: 40px;
}

/* 警报中心 */
.alerts-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.alerts-summary {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.alert-count {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 1.1rem;
}

.alert-count.high {
    background: var(--danger-color);
}

.alert-count.medium {
    background: var(--warning-color);
}

.alert-count.low {
    background: var(--info-color);
}

.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border-left: 4px solid;
    transition: all 0.2s ease;
}

.alert-item.danger {
    border-left-color: var(--danger-color);
}

.alert-item.warning {
    border-left-color: var(--warning-color);
}

.alert-item.info {
    border-left-color: var(--info-color);
}

.alert-item:hover {
    background: white;
    transform: translateX(5px);
}

.alert-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.alert-item.danger .alert-icon {
    background: var(--danger-color);
}

.alert-item.warning .alert-icon {
    background: var(--warning-color);
}

.alert-item.info .alert-icon {
    background: var(--info-color);
}

.alert-content {
    flex: 1;
    min-width: 0;
}

.alert-message {
    font-size: 0.85rem;
    color: var(--gray-700);
    font-weight: 500;
    margin-bottom: 2px;
}

.alert-time {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.alert-action {
    flex-shrink: 0;
}

.alert-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.alert-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* 响应式优化 */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .financial-metrics {
        flex-direction: column;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   智能建议组件样式
   ========================================================================== */

.smart-insights-container {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.smart-insights-panel {
    padding: 0;
}

.insights-header {
    background: var(--gradient-primary);
    color: white;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.insights-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.insights-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 500;
}

.insights-controls {
    display: flex;
    gap: 8px;
}

.insight-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.insight-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.insights-tabs {
    display: flex;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 0 25px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 20px;
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(30, 58, 138, 0.05);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(30, 58, 138, 0.05);
}

.insights-content {
    padding: 25px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.insights-summary {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: center;
}

.summary-item {
    text-align: center;
    padding: 15px 20px;
    border-radius: var(--radius-lg);
    border: 2px solid;
    background: white;
    min-width: 100px;
    transition: all 0.3s ease;
}

.summary-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.summary-item.high {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.summary-item.medium {
    border-color: var(--warning-color);
    color: var(--warning-color);
}

.summary-item.low {
    border-color: var(--info-color);
    color: var(--info-color);
}

.summary-count {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.summary-label {
    font-size: 0.9rem;
    font-weight: 500;
}

.insights-list {
    display: grid;
    gap: 20px;
}

.insight-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: all 0.3s ease;
    border-left: 4px solid;
}

.insight-card.warning {
    border-left-color: var(--warning-color);
}

.insight-card.danger {
    border-left-color: var(--danger-color);
}

.insight-card.info {
    border-left-color: var(--info-color);
}

.insight-card.success {
    border-left-color: var(--success-color);
}

.insight-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.insight-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px 15px;
    border-bottom: 1px solid var(--gray-100);
}

.insight-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-lg);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.insight-title-section {
    flex: 1;
    min-width: 0;
}

.insight-title {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.insight-category {
    font-size: 0.8rem;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.insight-impact {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid currentColor;
    flex-shrink: 0;
}

.insight-body {
    padding: 15px 25px 20px;
}

.insight-description {
    margin: 0 0 15px 0;
    color: var(--gray-600);
    line-height: 1.5;
}

.insight-metrics {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid;
}

.metric-item.positive {
    color: var(--success-color);
    border-color: var(--success-color);
    background: rgba(5, 150, 105, 0.1);
}

.metric-item.negative {
    color: var(--danger-color);
    border-color: var(--danger-color);
    background: rgba(220, 38, 38, 0.1);
}

.metric-item.score {
    color: var(--info-color);
    border-color: var(--info-color);
    background: rgba(2, 132, 199, 0.1);
}

.insight-actions {
    padding: 0 25px 20px;
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid;
}

.action-btn.primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.action-btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.action-btn.secondary {
    background: white;
    border-color: var(--gray-300);
    color: var(--gray-600);
}

.action-btn.secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.recommendations-list {
    display: grid;
    gap: 20px;
}

.recommendation-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: 25px;
    transition: all 0.3s ease;
}

.recommendation-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.rec-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.rec-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.rec-priority {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.rec-description {
    margin: 0 0 15px 0;
    color: var(--gray-600);
    line-height: 1.5;
}

.rec-metrics {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.rec-metric {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.metric-label {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.metric-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.rec-resources {
    margin-bottom: 20px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

.rec-actions {
    display: flex;
    gap: 10px;
}

.trends-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.trend-summary h4 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: var(--gray-800);
    font-weight: 600;
}

.trend-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.trend-metric {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.trend-metric:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.trend-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.trend-label {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.trend-arrow {
    font-size: 1rem;
}

.trend-arrow.positive {
    color: var(--success-color);
}

.trend-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.mini-trend-chart {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--gray-200);
}

.mini-trend-chart h5 {
    margin: 0 0 15px 0;
    font-size: 0.95rem;
    color: var(--gray-700);
    font-weight: 600;
}

.trend-line {
    height: 80px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .insights-tabs {
        padding: 0 15px;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .tab-btn {
        padding: 12px 15px;
        font-size: 0.8rem;
    }
    
    .insights-content {
        padding: 15px;
    }
    
    .insights-summary {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .insight-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .insight-actions {
        flex-direction: column;
    }
    
    .rec-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .rec-metrics {
        flex-direction: column;
        gap: 10px;
    }
    
    .trend-metrics {
        grid-template-columns: 1fr;
    }
    
    .trend-charts {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   左侧菜单栏响应式优化和高级功能
   ========================================================================== */

/* 菜单突出显示效果 */
#nav-sidebar .nav-sidebar ul li a:not(.addlink):focus,
#nav-sidebar .nav-sidebar ul li a.current {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light)) !important;
    color: white !important;
    border-left: 4px solid var(--warning-color);
    font-weight: 600;
    box-shadow: 2px 0 8px rgba(30, 58, 138, 0.3);
}

/* 菜单项加载动画 */
#nav-sidebar .nav-sidebar ul li {
    opacity: 0;
    transform: translateX(-20px);
    animation: slideInFromLeft 0.3s ease forwards;
}

#nav-sidebar .nav-sidebar ul li:nth-child(1) { animation-delay: 0.1s; }
#nav-sidebar .nav-sidebar ul li:nth-child(2) { animation-delay: 0.15s; }
#nav-sidebar .nav-sidebar ul li:nth-child(3) { animation-delay: 0.2s; }
#nav-sidebar .nav-sidebar ul li:nth-child(4) { animation-delay: 0.25s; }
#nav-sidebar .nav-sidebar ul li:nth-child(5) { animation-delay: 0.3s; }
#nav-sidebar .nav-sidebar ul li:nth-child(6) { animation-delay: 0.35s; }
#nav-sidebar .nav-sidebar ul li:nth-child(7) { animation-delay: 0.4s; }
#nav-sidebar .nav-sidebar ul li:nth-child(8) { animation-delay: 0.45s; }
#nav-sidebar .nav-sidebar ul li:nth-child(n+9) { animation-delay: 0.5s; }

@keyframes slideInFromLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 菜单项分组标签 */
#nav-sidebar .nav-sidebar h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

/* 为特定模块添加不同的强调色 */
#nav-sidebar .nav-sidebar > div:nth-child(1) h2 {
    background: linear-gradient(135deg, #1e3a8a, #2563eb) !important;
}

#nav-sidebar .nav-sidebar > div:nth-child(2) h2 {
    background: linear-gradient(135deg, #059669, #10b981) !important;
}

#nav-sidebar .nav-sidebar > div:nth-child(3) h2 {
    background: linear-gradient(135deg, #d97706, #f59e0b) !important;
}

/* 移动端优化 */
@media (max-width: 768px) {
    #nav-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 9999;
        box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    }
    
    #nav-sidebar.show {
        transform: translateX(0);
    }
    
    .main {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    /* 移动端菜单按钮 */
    .mobile-menu-toggle {
        display: block !important;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 10000;
        background: var(--primary-color);
        color: white;
        border: none;
        padding: 12px 14px;
        border-radius: 8px;
        font-size: 1.2rem;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
        transition: all 0.3s ease;
    }
    
    .mobile-menu-toggle:hover {
        background: var(--primary-dark);
        transform: scale(1.05);
    }
    
    /* 菜单遮罩 */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .menu-overlay.show {
        opacity: 1;
        visibility: visible;
    }
    
    /* 移动端菜单项调整 */
    #nav-sidebar .nav-sidebar ul li a:not(.addlink) {
        padding: 16px 18px !important;
        font-size: 1rem;
    }
    
    #nav-sidebar .nav-sidebar h2 {
        padding: 20px !important;
        font-size: 1.1rem !important;
    }
}

@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .menu-overlay {
        display: none !important;
    }
}

/* 菜单项点击波纹效果 */
#nav-sidebar .nav-sidebar ul li a:not(.addlink)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    pointer-events: none;
}

#nav-sidebar .nav-sidebar ul li a:not(.addlink):active::after {
    width: 200px;
    height: 200px;
}

/* 保持菜单状态指示 */
.sidebar-status {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--success-color);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-status.show {
    opacity: 1;
}

/* 菜单搜索功能样式（如果需要） */
.menu-search {
    padding: 15px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.menu-search input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--gray-300);
    border-radius: 20px;
    font-size: 0.9rem;
    background: white;
    transition: all 0.3s ease;
}

.menu-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}